package vn.com.bookstore.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import vn.com.bookstore.domain.model.SupportNews;
import vn.com.bookstore.service.SupportNewsService;

@Controller
public class SupportNewsController {

	@Autowired
	private SupportNewsService supportNewsService;
	
	@RequestMapping(value="online/view-support", method=RequestMethod.GET)
	public String viewHelp(Model model){
		List<SupportNews> supportNews = supportNewsService.getAllSupportNews();
		model.addAttribute("supportNews", supportNews);
		return "website/support-news/view-support";
	}
}
